package com.Homework.test;

import java.io.*;
import java.util.ArrayList;
import java.util.Scanner;

public class ChangeFile {


    public static void main(String[] args) throws IOException {


        ArrayList<Yq> yq = new ArrayList();

        InputTheYq inputTheYq = new InputTheYq();

        InputData inputData = new InputData();

        Scanner input = new Scanner(System.in);
        System.out.println("请输入您要执行的操作：1. 缺省输出。 2. 全部输出。 3. 指定省份输出：");
        int userNum = input.nextInt();
        switch (userNum) {
            case 1:
                PrintNull printNull = new PrintNull();
                printNull.printnull();
                break;

            case 2:
                String[] In1 = inputTheYq.Input();
                inputData.inputdata(In1,yq);
                PrintAll printAll = new PrintAll();
                //进行市排
                Sort sort = new Sort();
                sort.sort_(In1,yq);
                //进行省排
                ProvinceSort provinceSort = new ProvinceSort();
                int[] Sum  = provinceSort.Pronvincesort(yq);
                //输出
                printAll.printall(yq,In1,Sum);
                break;
            case 3:
                String[] In2 = inputTheYq.Input();
                inputData.inputdata(In2,yq);
                //进行市排
                Sort sort1 = new Sort();
                sort1.sort_(In2,yq);
                //输出
                PrintOne printOne = new PrintOne();
                printOne.printone(In2,yq);
                break;
        }


    }
}




